if (HSMBUILD_DISPATCHER_STD)
    set(HSM_DEFINITIONS_STD ${HSM_DEFINITIONS_BASE} -DHSM_BUILD_HSMBUILD_DISPATCHER_STD CACHE STRING "" FORCE)
    add_definitions(-DHSM_BUILD_HSMBUILD_DISPATCHER_STD)
    add_library(${HSM_LIBRARY_NAME}_std STATIC ${CMAKE_CURRENT_SOURCE_DIR}/src/HsmEventDispatcherSTD.cpp)

    if (NOT WIN32)
        target_compile_options(${HSM_LIBRARY_NAME}_std PUBLIC "-fPIC")
    endif()

    # Export variables
    if (NOT WIN32)
        set(HSMCPP_STD_CXX_FLAGS ${HSMCPP_CXX_FLAGS} -pthread CACHE STRING "" FORCE)
    else()
        set(HSMCPP_STD_CXX_FLAGS ${HSMCPP_CXX_FLAGS} "" CACHE STRING "" FORCE)
    endif()
    set(HSMCPP_STD_LIB ${HSM_LIBRARY_NAME}_std ${HSMCPP_LIB} ${CMAKE_THREAD_LIBS_INIT} CACHE STRING "" FORCE)
    set(HSMCPP_STD_INCLUDE ${HSMCPP_INCLUDE} CACHE STRING "" FORCE)
endif()
